<%@page import="com.wframe.framework.util.UploadUtil"%>
<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib uri="/WEB-INF/page-base.tld" prefix="w"%>
<%String path=request.getContextPath(); request.setAttribute("fileserver", UploadUtil.getConfig().getDownserver());%>
<style>
.authwinstate2{color:blue}
.authwinstate3{color:red}
.cercard{border:1px solid #ddd;width:280px;height:280px;margin:8px;padding:8px 10px}
.cercard .title{font-weight:bold;text-align:center;padding:4px 0px}
.cercard .con{padding:4px 0px}
.cercard .img{text-align:center;padding-top:8px}
.cercard .img img{max-width:100%;}
.msgcard{border:1px solid #ddd;padding:4px;font-weight:bold}
.msgcard label{display:inline-block;}
</style>

<div style="margin:5px">
<w:hidden bind="bean.id"/>
<w:hidden bind="bean.userid"/>
<div class="ui-formContent" style="padding:10px 30px;">
	<div class="headT"><span></span><label>企业信息</label></div>
	<div class="line8"></div>
	<w:equal bind="bean.state" value="1">
		<div class="msgcard">
			<label>审核状态：<font class="authwinstate<w:write bind="bean.state"/>"><w:write bind="bean.state" format="[,待审核,已通过,不通过]"/></font></label>
			<label>&nbsp;&nbsp;申请时间：<w:write bind="bean.submittime" format="yyyy-MM-dd HH:mm"/></label>
		</div>
	</w:equal>
	<w:equal bind="bean.state" value="2">
		<div class="msgcard">
			<label>审核状态：<font class="authwinstate<w:write bind="bean.state"/>"><w:write bind="bean.state" format="[,待审核,已通过,不通过]"/></font></label>
			<label>&nbsp;&nbsp;申请时间：<w:write bind="bean.submittime" format="yyyy-MM-dd HH:mm"/></label>
			<label>&nbsp;&nbsp;审核时间：<w:write bind="bean.authtime" format="yyyy-MM-dd HH:mm"/></label>
		</div>
	</w:equal>
	<w:equal bind="bean.state" value="3">
		<div class="msgcard">
			<label>审核状态：<font class="authwinstate<w:write bind="bean.state"/>"><w:write bind="bean.state" format="[,待审核,已通过,不通过]"/></font></label>
			<label>&nbsp;&nbsp;申请时间：<w:write bind="bean.submittime" format="yyyy-MM-dd HH:mm"/></label>
			<p>拒绝原因：<w:write bind="bean.authcon"/></p>
		</div>
	</w:equal>
	<div class="line8"></div>
	<table width="80%" cellpadding="2" cellspacing="2">
		<tr>
			<td align="right" width="120">企业类型：</td><td><w:write bind="bean.type" dict="CompanyType"/></td>
		</tr>
		<tr>
			<td align="right" >营业执照注册号：</td><td><w:write bind="bean.idnum"/></td>
		</tr>
		<tr>
			<td align="right">企业名称：</td><td><w:write bind="bean.name"/></td>
		</tr>
		<tr>
			<td align="right">联系人：</td><td><w:write bind="bean.contacts"/></td>
		</tr>
		<tr>
			<td align="right">联系电话：</td><td><w:write bind="bean.phone"/></td>
		</tr>
		<tr>
			<td align="right">所属区域：</td><td><w:write bind="bean.province"/><w:write bind="bean.city"/><w:write bind="bean.region"/></td>
		</tr>
		<tr>
			<td align="right">详细地址：</td><td><w:write bind="bean.address"/></td>
		</tr>
	</table>
	<div class="line8"></div><div class="line8"></div><div class="line8"></div>
	<div class="headT"><span></span><label>企业资质信息</label></div>
	<table cellpadding="0" cellspacing="0">
		<w:iterate bind="#qullist" id="info" indexId="num">
		<%if(num%3==0)out.print("<tr>"); %>
		<td>
			<div class="cercard">
				<div class="title"><w:write bind="#info.type" dict="CerType"/></div>
				<div class="con">证件号码：<w:write bind="#info.idnum"/></div>
				<div class="con">证件有效期：<w:write bind="#info.validity_start"/>至<w:write bind="#info.validity_end"/></div>
				<div class="img">
					<w:notEqual bind="#info.img" value=""><img src="${fileserver }<w:write bind="#info.img"/>" style="max-width:100%;max-height:190px"></w:notEqual>
				</div>
			</div>
		</td>
		</w:iterate>
	</tr>
	</table>
	<w:equal value="1" bind="bean.state">
	<div class="line8"></div><div class="line8"></div>
	<div style="margin-left:100px">
		<a href="javascript:;" class="easyui-linkbutton marginR16" iconCls="icon_save" onclick="comauthpass()">通过</a>
		<a href="javascript:;" class="easyui-linkbutton marginR16" iconCls="icon_save" onclick="comauthnopass()">不通过</a>
		<a href="javascript:;" class="easyui-linkbutton" iconCls="icon_cancel" onclick="$w.closeCurrWin()">关闭</a>
	</div>
	</w:equal>
	<div class="line8"></div><div class="line8"></div>
	<div class="line8"></div><div class="line8"></div>
</div>
</div>
<script>
function comauthpass(){
	window.parent.$w.confirmMsg("确定通过该企业认证？", function(r){
		if(r){
			$w.doUrl(ctx+"/user/UserPage@authPass.page?bean.userid="+$getByName("bean.userid",$w.currWin()).val()+"&bean.id="+$getByName("bean.id",$w.currWin()).val(),{},function(ret){
				if(ret.state=='ok'){
					window.parent.$w.correctMsg("已成功审核通过");
					$w.closeCurrWin('ok');
				}
			})
		}
	})
}
function comauthnopass(){
	window.parent.$w.openDialog({url:ctx+"/webadmin/user/authOpinion.jsp?bean.userid="+$getByName("bean.userid",$w.currWin()).val()+"&bean.id="+$getByName("bean.id",$w.currWin()).val(),title:"不通过原因",w:500,h:260,afterClose:function(re){
		if(re){
			$w.closeCurrWin('ok');
		}
	}});
}
</script>